871.	Tax on nonresident alien individuals

(a)	Income not connect with United States business -- 30 percent tax. --

(1)	Income other than capital gains. -- Except as provided in subsection (h), there is hereby imposed for each taxable year a tax of 30 percent of the amount received from sources within the United States by a nonresident alien individual as --

(A)	interest (other than original issue discount as defined in section 1273), dividends, rents, salaries, wages, premiums, annuities, compensations, remunerations, emoluments, and other fixed or determinable annual or periodical gains, profits, and income,

(B)	gains described in section 402(a)(2), 403(a)(2), or 631(b) or (c), and gains or transfers described in section 1235 made on or before October 4, 1966,

(C)	in the case of --

(i)	a sale or exchange of an original issue discount obligation, the amount of the original issue discount accruing while such obligation was held by the nonresident alien individual (to the extent such discount was not theretofore taken into account under clause (ii)), and

(ii)	a payment on an original issue discount obligation, an amount equal to the original issue discount accruing while such obligation was held by the nonresident alien individual (except that such original issue discount shall be taken into account under this clause only to the extent such discount was not theretofore taken into account under this clause and only to the extent that the tax thereon does not exceed the payment less the tax imposed by subparagraph (A) thereon), and

(D)	gains from the sale or exchange after October 4, 1966, of patents, copyrights, secret processes and formulas, good will, trademarks, trade brands, franchises, and other like property, or any interest in any such property, to the extent such gains are from payments which are contingent on the productivity, use, or disposition of the property or interest sold or exchange,

but only to the extent the amount so received is not effectively connected with the conduct of a trade or business within the United States.

(2)	Capital gains of aliens present in the United States 183 days or more. --

In the case of a nonresident alien individual present in the United States for a period or periods aggregating 183 days or more during the taxable year, there is hereby imposed for such year a tax of 30 percent of the amount by which his gains, derived from sources within the United States, from the sale or exchange at any time during such year of capital assets exceed his losses, allocable to sources within the United States, from the sale or exchange at any time during such year of capital assets. For purposes of this paragraph, gains and losses shall be taken into account only if, and to the extent that, they would be recognized and taken into account if such gains and losses were effectively connected with the conduct of a trade or business within the United States, except that such losses shall be determined without the benefits of the capital loss carryover provided in section 1212. Any gain or loss which is taken into account in determining the tax under paragraph (1) or subsection (b) shall not be taken into account in determining the tax under this paragraph. For purposes of the 183-day requirement of this paragraph, a nonresident alien individual not engaged in trade or business within the United States who has not established a taxable year for any prior period shall be treated as having a taxable year which is the calendar year.

(3)	Taxation of social security benefits. -- For purposes of this section and section 1441 --

(A)	one-half of any social security benefit (as defined in section 86(d)) shall be included in gross income (notwithstanding section 207 of the Social Security Act), and

(B)	section 86 shall not apply.

For treatment of certain citizens of possessions of the United States, see section 932(c).

(b)	Income connected with the United States business -- graduated rate of tax. --

(1)	Imposition of tax. -- A nonresident alien individual engaged in trade or business within the United States during the taxable year shall be taxable as provided in section 1, 55, or 402(e)(1) on his taxable income which is effectively connected with the conduct of a trade or business within the United States.

(2)	Determination of taxable income. -- In determining taxable income for purposes of paragraph (1), gross income includes only gross income which is effectively connected with the conduct of a trade or business within the United States.

(c)	Participants in certain exchange or training programs. -- For purposes of this section, a nonresident alien individual who (without regard to this subsection ) is not engaged in trade or business within the United States and who is temporarily present in the United States as a nonimmigrant under subparagraph (F), (J), or (M) of section 101(a)(15) of the Immigration and Nationality Act, as amended (8 U.S.C. 1101a(a)(15)(F), (J), or (M)), shall be treated as a nonresident alien individual engaged in trade or business within the United States, and any income described in the second sentence of section 1441(b) which is received by such individual shall, to the extent derived from sources within the United States, be treated as effectively connected with the conduct of a trade or business within the United States.

(d)	Election to treat real property income as income connected with United States business. --

(1)	In general. -- A nonresident alien individual who during the taxable year derives any income --

(A)	from real property held for the production of income and located in the United States, or from any interest in such real property, including (i) gains from the sale or exchange of such real property or an interest therein, (ii) rents or royalties from mines, wells, or other natural deposits, and (iii) gains described in section 631(b) or (c), and

(B)	which, but for this subsection, would not be treated as income which is effectively connected with the conduct of a trade or business within the United States,

may elect for such taxable year to treat all such income as income which is effectively connected with the conduct of a trade or business within the United States. In such case, such income shall be taxable as provided in subsection (b)(1) whether or not such individual is engaged in trade or business within the United States during the taxable year. An election under this paragraph for any taxable year shall remain in effect for all subsequent taxable years, except that it may be revoked with the consent of the Secretary with respect to any taxable year.

(2)	Election after revocation. -- If an election has been made under paragraph (1) and such election has been revoked, a new election may not be made under such paragraph for any taxable year before the 5th taxable year which begins after the first taxable year for which such revocation is effective, unless the Secretary consents to such new election.

(3)	Form and time of election and revocation. -- An election under paragraph (1), and any revocation of such an election, may be made only in such manner and at such time as the Secretary may by regulations prescribe.

(e)	Repealed.

(f)	Certain annuities received under qualified plans. --

(1)	In general. -- For purposes of this section, gross income does not include any amount received as an annuity under a qualified annuity plan described in section 403(a)(1), or from a qualified trust described in section 401(a) which is exempt from tax under section 501(a), if --

(A)	All of the personal services by reason of which the annuity is payable were either --

(i)	personal services performed outside the United States by an individual who, at the time of performance of such personal services, was a nonresident alien, or

(ii)	personal services described in section 864(b)(1) performed within the United States by such individual, and

(B)	at the time the first amount is paid as an annuity under the annuity plan or by the trust, 90 percent or more of the employees for whom contributions or benefits are provided under such annuity plan, or under the plan or plans of which the trust is a part, are citizens or residents of the United States.

(2)	Exclusion. -- Income received during the taxable year which would be excluded from gross income under this subsection but for the requirement of paragraph (1)(B) shall not be included in gross income if ---

(A)	the recipient's country of residence grants a substantially equivalent exclusion to residents and citizens of the United States; or

(B)	the recipient's country of residence is a beneficiary developing country within the meaning of section 502 of the Trade Act of 1974 (19 U.S.C. 2462).

(g)	Special rules for original issue discount. -- For purposes of this section and section 881 --

(1)	Original issue discount obligation. --

(A)	In general. -- Except as provided in subparagraph (B), the term "original issue discount obligation" means any bond or other evidence of indebtedness having original issue discount (within the meaning of section 1273).

(B)	Exceptions. -- The term "original issue discount obligation" shall not include --

(i)	Certain short-term obligations. -- Any obligation payable 183 days or less from the date of original issue (without regard to the period held by the taxpayer).

(ii)	Tax-exempt obligations. -- Any obligation the interest on which is exempt from tax under section 103 or under any other provision of law without regard to the identity of the holder.

(2)	Determination of portion of original issue discount accruing during any period. -- The determination of the amount of the original issue discount which accrues during any period shall be made under the rules of section 1272 (or the corresponding provisions of prior law) without regard to any exception for short-term obligations.

(3)	Source of original issue discount. -- Except to the extent provided in regulations prescribed by the Secretary, the determination of whether any amount described in subsection (a)(1)(C) is from sources within the United States shall be made at the time of the payment (or sale or exchange) as if such payment (or sale or exchange) involved the payment of interest.

(4)	Stripped bonds. -- The provisions of section 1286 (relating to the treatment of stripped bonds and stripped coupons as obligations with original issue discount) shall apply for purposes of this section.

(h)	Repeal of tax on interest of nonresident alien individuals received from certain portfolio debt investments. --

(1)	In general. -- In the case of any portfolio interest received by a nonresident individual from sources within the United States, no tax shall be imposed under paragraph (1)(A) or (1)(C) of subsection (a).

(2)	Portfolio interest. -- For purposes of this subsection, the term "portfolio interest" means any interest (including original issue document) which would be subject to tax under subsection (a) but for this subsection and which is described in any of the following subparagraphs:

(A)	Certain obligations which are not registered. -- Interest which is paid on any obligation which --

(i)	is not in registered form, and

(ii)	is described in section 163(f)(2)(B).

(B)	Certain registered obligations. -- Interest which is paid on an obligation --

(i)	which is in registered form, and

(ii)	with respect to which the United States person who would otherwise be required to deduct and withhold tax from such interest under section 1441(a) receives a statement (which meets the requirements of paragraph (4)) that the beneficial owner of the obligation is not a United States person.

(3)	Portfolio interest not to include interest received by 10-percent shareholders. -- For purposes of this subsection --

(A)	In general. -- The term "portfolio interest" shall not include any interest described in subparagraph (A) or (B) of paragraph (2) which is received by a 10-percent shareholder.

(B)	10-percent shareholder. -- The term "10-percent shareholder" means --

(i)	in the case of an obligation issued by a corporation, any person who owns 10 percent or more of the total combined voting power of all classes of stock of such corporation entitled to vote, or

(ii)	in the case of an obligation issued by a partnership, any person who owns 10 percent or more of the capital or profits interest in such partnership.

(C)	Attribution rules. -- For purposes of determining ownership of stock under subparagraph (B)(i) the rules of section 318(a) shall apply, except that --

(i)	section 318(a)(2)(C) shall be applied without regard to the 50-percent limitation therein,

(ii)	section 318(a)(3)(C) shall be applied --

(I)	without regard to the 50-percent limitation therein; and

(II)	in any case where such section would not apply but for subclause (I), by considering a corporation as owning the stock (other than stock in such corporation) which is owned by or for any shareholder of such corporation in that proportion which the value of the stock which such shareholder owns in such corporation bears to the value of all stock in such corporation, and

(iii) any stock which a person is treated as owning after application of section 318(a)(4) shall not, for purposes of applying paragraphs (2) and (3) of section 318(a), be treated as actually owned by such person.

Under regulations prescribed by the Secretary, rules similar to the rules of the preceding sentence shall be applied in determining the ownership of the capital or profits interest in a partnership for purposes of subparagraph (B)(ii).

(4)	Certain statements. -- A statement with respect to any obligation meets the requirements of this paragraph if such statement is made by --

(A)	the beneficial owner of such obligation, or

(B)	a securities clearing organization, a bank, or other financial institution that holds customers securities in the ordinary course of its trade or business.

The preceding sentence shall not apply to any statement with respect to payment of interest on any obligation by any person if, at least one month before such payment, the Secretary has published a determination that any statement from such person (or any class including such person) does not meet the requirements of this paragraph.

(5)	Secretary may provide subsection not to apply in cases of inadequate information exchange. --

(A)	In general. -- If the Secretary determines that the exchange of information between the United States and a foreign country is inadequate to prevent evasion of the United States income tax by United States persons, the Secretary may provide in writing (add publish a statement) that the provisions of this subsection shall not apply to payments of interest to any person within such foreign country (or payments addressed to, or for the account of, persons within such foreign country) during the period --

(i)	beginning on the date specified by the Secretary, and

(ii)	ending on the date that the Secretary determines that the exchange of information between the United States and the foreign country is adequate to prevent the evasion of United States income tax by United States persons.

(B)	Exception for certain obligations. -- Subparagraph (A) shall not apply to the payment of interest on any obligation which is issued on or before the date of the publication of the Secretary's determination under such subparagraph.

(6)	Registered form. -- For purposes of this subsection, the term "registered form" has the same meaning given such term by section 163(f).

(i)	Tax not to apply to certain interest and dividends. --

(1)	In general. -- No tax shall be imposed under paragraph (1)(A) or (1)(C) of subsection (a) on any amount described in paragraph (2).

(2)	Amounts to which paragraph (1) applies. -- The amounts described in this paragraph are as follows:

(A)	Interest on deposits, if such interest is not effectively connect with the conduct of a trade or business within the United States.

(B)	A percentage of any dividend paid by a domestic corporation meeting the 80-percent foreign business requirements of section 861(c)(1) equal to the percentage determined for purposes of section 861(c)(2)(A).

(C)	Income derived by a foreign central bank of issue from bankers' acceptances.

(3)	Deposits. -- For purposes of paragraph (2), the term "deposits" means amounts which are --

(A)	deposits with person carrying on the banking business,

(B)	deposit is or withdrawable accounts with savings institutions chartered and supervised as savings and loan or similar associations under Federal or State law, but only to the extent that amounts paid or credited on such deposits or accounts are deductible under section 591 (determined without regard to sections 265 and 291) in computing the taxable income of such institutions, and

(C)	amounts held by an insurance company under an agreement to pay interest thereon.

(j)`	Exemption for certain gambling winnings. -- No tax shall be imposed under paragraph (1)(A) of subsection (a) on the proceeds from a wager placed in any of the following games: blackjack, baccarat, craps, roulette, or big-6 wheel. The preceding sentence shall not apply in any case where the Secretary determines by regulation that the collection of the tax is administratively feasible.

(k)	Cross references. --

(1)	For tax treatment of certain amounts distributed by the United States to nonresident alien individuals, see section 402(a)(4).

(2)	For taxation of nonresident alien individuals who are expatriate United States citizens, see section 877.

(3)	For doubling of tax on citizens of certain foreign countries, see section 891.

(4)	For adjustment of tax in case of nationals or residents of certain foreign countries, see section 896.

(5)	For withholding of tax at source on nonresident alien individuals, see section 891.

(6)	For election to treat married nonresident alien individual as resident of United States in certain cases, see subsections (g) and (h) of section 6013.

(7)	For special tax treatment of gain or loss from the disposition by a nonresident alien individual of a United States real property interest, see section 897.

872.	Gross income

(a)	General rule. -- In the case of a nonresident alien individual, except where the context clearly indicates otherwise, gross income includes only --

(1)	gross income which is derived from sources within the United States and which is not effectively connected with the conduct of a trade or business within the United States, and

(2)	gross income which is effectively connected with the conduct of a trade or business within the United States.

(b)	Exclusions. -- The following items shall not be included in gross income of a nonresident alien individual, and shall be exempt from taxation under this subtitle.

(1)	Ships operated by certain nonresidents. -- Gross income derived by an individual resident of a foreign country from the international operation of a ship or ships if such foreign country grants an equivalent exemption to individual residents of the United States.

(2)	Aircraft operated by certain nonresidents. -- Gross income derived by an individual resident of a foreign country from the international operation of aircraft if such foreign country grants an equivalent exemption to individual residents of the United States.

(3)	Compensation of participants in certain exchange or training programs. -- Compensation paid by a foreign employer to a nonresident alien individual for the period he is temporarily present in the United States as a nonimmigrant under subparagraph (F) or (J) of section 101(a)(15) of the Immigration and Nationality Act, as amended. For purposes of this paragraph, the term "foreign employer" means --

(A)	a nonresident alien individual, foreign partnership, or foreign corporation, or

(B)	an office or place of business maintained in a foreign country or in a possession of the United States by a domestic corporation, a domestic partnership, or an individual who is a citizen or resident of the United States.

(4)	Certain bond income of residents of the Ryukyu Islands or the Trust Territory of the Pacific Islands. -- Income derived by a nonresident alien individual from a series E or series H United States savings bond, if such individual acquired such bond while a resident of the Ryukyu Island or the Trust Territory of the Pacific Islands.

(5)	Certain rental income. -- Income to which paragraphs (1) and (2) apply shall include income which is derived from the rental on a full or bareboat basis of a ship or ships or aircraft, as the case may be.

(6)	Application to different types of transportation. -- The Secretary may provide that this subsection be applied separately with respect to income from different types of transportation.

(7)	Treatment of possessions. -- To the extent provided in regulations, a possession of the United States shall be treated as a foreign country for purposes of this subsection.

873.	Deductions

(a)	General rule. -- In the case of a nonresident alien individual, the deductions shall be allowed only for purposes of section 871(b) and (except as provided by subsection (b)) only if and to the extent that they are connected with income which is effectively connected with the conduct of a trade or business within the United States; and the proper apportionment and allocation of the deductions for this purpose shall be determined as provided in regulations prescribed by the Secretary.

(b)	Exceptions. -- The following deductions shall be allowed whether or not they are connected with income which is effectively connected with the conduct of a trade or business within the United States:

(1)	Losses. -- The deduction for losses allowed by section 165(c)(3), but only if the loss is of property located within the United States.

(2)	Charitable contributions. -- The deduction for charitable contributions and gifts allowed by section 170.

(3)	Personal exemption. -- The deduction for person exemptions allowed by section 151, except that only one exemption shall be allowed under section 151 unless the taxpayer is a resident of a contiguous country or is a national of the United States.

(c)	Cross reference. --

For rule that certain foreign taxes are not to be taken into account in determining deduction or credit, see section 906(b)(1).

874.	Allowance of deductions and credits

(a)	Return prerequisite to allowance. -- A nonresident alien individual shall receive the benefit of the deductions and credits allowed to him in this subtitle only by filing or causing to be filed with the Secretary a true and accurate return, in the manner prescribed in subtitle F (sec. 6001 and following, relating to procedure and administration), including therein all the information which the Secretary may deem necessary for the calculation of such deductions and credits. This subsection shall not be construed to deny the credits provided by section 31 and 33 for tax withheld at source or the credit provided by section 34 for certain uses of gasoline and special fuels.

(b)	Tax withheld at source. -- The benefit of the deduction for exemptions under section 151 may, in the discretion of the Secretary, and under regulations prescribed by the Secretary, be received by a nonresident alien individual entitled thereto, by filing a claim therefor with the withholding agent.

(c)	Foreign tax credit. -- Except as provided in section 906, a nonresident alien individual shall not be allowed the credits against the tax for taxes of foreign countries and possessions of the United States allowed by section 901.

875.	Partnerships; beneficiaries of estates and trusts

For purposes of this subtitle --

(1)	a nonresident alien individual or foreign corporation shall be considered as being engaged in a trade or business within the United states if the partnership of which such individual or corporation is a member is so engaged, and

(2)	a nonresident alien individual or foreign corporation which is a beneficiary of an estate or trust which is engaged in any trade or business within the United States shall be treated as being engaged in such trade or business within the United States.

876.	Alien residents of Puerto Rico, Guam, American Samoa, or the Northern Mariana Islands

(a)	General rule. -- This subpart shall not apply to any alien individual who is a bona fide resident of Puerto Rico, Guam, American Samoa, or the Northern Mariana Islands during the entire taxable year and such alien shall be subject to the tax imposed by section 1.

(b)	Cross reference.

For exclusion from gross income of income derived from sources within --

(1)	Guam, American Samoa, and the Northern Mariana Islands, see section 931, and

(2)	Puerto Rico, see section 933.

877.	Expatriation to avoid tax

(a)	In general. -- Every nonresident alien individual who at any time after March 8, 1965, and within the 10-year period immediately preceding the close of the taxable year lost United States citizenship, unless such loss did not have for one of its principal purposes the avoidance of taxes under this subtitle or subtitle B. shall be taxable for such taxable year in the manner provided in subsection (b) if the tax imposed pursuant to such subsection exceed the tax which, without regard to this section, is imposed pursuant to section 871.

(b)	Alternative tax. -- A nonresident alien individual described in subsection (a) shall be taxable for the taxable year as provided in section 1, 55, or 402(e)(1), except that --

(1)	the gross income shall include only the gross income described in section 872(a) (as modified by subsection (c) of this section), and

(2)	the deductions shall be allowed if and to the extent that they are connected with the gross income included under this section, except that the capital loss carryover provided by section 1212(b) shall not be allowed; and the proper allocation and apportionment of the deductions for this purpose shall be determined as provided under regulations prescribed by the Secretary.

For purposes of paragraph (2), the deductions allowed by section 873(b) shall be allowed; and the deduction (for losses not connected with the trade or business if incurred in transactions entered into for profit) allowed by section 165(c)(2) shall be allowed, but only if the profit, if such transaction had resulted in a profit, would be included in gross income under this section.

(c)	Special rules of source. -- For purposes of subsection (b), the following items of gross income shall be treated as income from sources within the United States:

(1)	Sale of property. -- Gains on the sale or exchange (other then stock or debt obligations) located in the United States.

(2) Stock or debt obligations. -- Gain on the sale or exchange of stock issued by a domestic corporation or debt obligations of United States persona or of the United States, a State or political subdivision thereof, or the District of Columbia.

For purposes of this section, gain on the sale or exchange of property which as a basis determined in whole or in part by reference to property described in paragraph (1) or (2) shall be treated as gain described in paragraph (1) or (2).

(d)	Exception for loss of citizenship for certain causes. Subsection (a) shall not apply to a nonresident alien individual whose loss of United States citizenship resulted from the application of section 301(b), 350, or 355 of the Immigration and Nationally Act, as amended (8 U.S.C. 1401(b), 1482, or 1487).

(e)	Burden of proof. -- If the Secretary establishes that it is reasonable to believe that an individual's loss of United States citizenship would, but for this section, result in a substantial reduction for the taxable year in the taxes on his probable income for such year, the burden of proving for such taxable year that such loss of citizenship did not have for one of its principal purposes the avoidance of taxes under this subtitle or subtitle B shall be on such individual.